import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
	state:{
		showLogin: false,
		isLoading: false,
		openDialog: {
			name:"",
			timeStamp:""
		},
		light:{
			curLight:1,
			manualLight:1,
			diseaseLight:1,
			lifeLight:1,
			symptomLight:1
		},
		patient:{
			complaintName:'',
			lifeCodes:'',
			nurseDisposals:[],
		},
		lifeCodes:'',
		reData:{
			patient:{
				recordUUID:""
			}
		},
		showCard:{//控制护理内容和诊疗内容切换
			name:'doctor'
		},
		saveFlag:{flag: ""},//病历中是否确认归档
		timerFlag:{flag:""},
	},
	mutations:{
		setShowLogin(state,obj){
			state.showLogin = obj.showLogin;
		},
		setIsLoading(state,obj){
			state.isLoading = obj.isLoading;
		},
		setLight(state,obj){
			state.light = obj.light;
		},
		setPatient(state,obj){
			state.patient = obj.patient;
		},
		setOpenDialog(state,obj){
			state.openDialog = obj.openDialog;
		},
		setShowCard(state,obj){
			state.showCard = obj.showCard;
		},
		setSaveFlag(state,obj){
			state.saveFlag = obj.saveFlag;
		},
		setTimerFlag(state,obj){
			state.saveFlag = obj.timerFlag;
		},
		setReData(state,obj){
			state.reData = obj.reData;
		},
		setLifeCodes(state,obj){
			state.lifeCodes = obj.lifeCodes;
		}
		
	}
})